#include"log.hpp"
int main()
{
     //1 打开管道
    int fd = open(FILENAME, O_APPEND | O_WRONLY, MODE);
    
    cout<<fd<<endl;
    //2 发送指令
    string s;
    cout<<"client准备写入:"<<s<<endl;
    while(getline(cin,s))
    {
        cout<<"client已经写入:"<<s<<endl;
        write(fd,s.c_str(),s.size());
    }
    close(fd);
    return 0;
}